<?php
use yii\helpers\Html;
use common\components\helpers\Fun;
use common\components\widgets\Datetimepicker;

Datetimepicker::widget();

?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">

        <?= \yii\helpers\Html::beginForm(Fun::url(['goodscourse/recharge', 'type_id' => \Yii::$app->request->get('type_id')]), 'get', ['enctype' => 'multipart/form-data']) ?>
        <div style="float: left">
            <?= \common\components\helpers\Search::textInput('searchDate', null, ['label' => '充值日期', 'class' => 'search datetimepicker yx-width150 zx-lh24 yx-ml6']); ?>
            <?= \common\components\helpers\Search::dropDownList('searchWay', null, [1 => '按月', 2 => '按日'], ['label' => '按月按日', 'promote' => '请选择', 'encode' => false, 'class' => 'search diy_select_txt']) ?>
            <?= \common\components\helpers\Search::textInput('mobile', null, ['label' => '手机号', 'class' => 'search yx-width150 zx-lh24 yx-ml6']); ?>
            <?= \common\components\helpers\Search::textInput('name', null, ['label' => '会员名称', 'class' => 'search yx-input-text zx-width150 yx-ml6']); ?>
            <?= \common\components\helpers\Search::submitButton('搜索', ['id' => 'search-handle', 'class' => "yx-search yx-radius2"]); ?>
        </div>
        <div class="yx-clear"></div>
        <?= \yii\helpers\Html::endForm() ?>
    </div>
    <div id="data_totals" class="yx-total-box" style="margin: 0 20px">
        <?= $content ?>
    </div>
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check"
               data-tablesaw-mode="swipe" data-tablesaw-minimap>
            <thead>
            <tr>
            <tr class="yx-bgd2f6ec">
                <th><?= \Yii::t('zhtfrontend', 'ID'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '会员名称'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '支付总额'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '现金支付'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '会员卡支付'); ?></th>
                <th><?= \Yii::t('zhtfrontend', 'pos支付'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '赠送金额'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '操作员'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '创建时间'); ?></th>
            </tr>
            </thead>
            <?php if ($data): ?>
                <?php foreach ($data as $item): ?>
                    <tr data-id="<?= $item['id'] ?>">
                        <td><?= $item['id'] ?></td>
                        <td><?= $item['customer_name'] ?></td>
                        <td><?= $item['cash'] ?></td>
                        <td><?= $item['pay_cash'] ?></td>
                        <td><?= $item['pay_card'] ?></td>
                        <td><?= $item['pay_pos'] ?></td>
                        <td><?= $item['free'] ?></td>
                        <td><?= $item['admin_name'] ?></td>
                        <td><?= $item['created_at'] ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </table>
        <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
    </div>
</div>


